import request from '../utils/request';

export const sysJobPage = query => {
    return request({
        url: '/sysJob/page',
        method: 'get',
        params: query
    });
};

export const saveSysJob = data => {
    return request({
        url: '/sysJob/save',
        method: 'post',
        data: data
    });
};

export const updateSysJob = data => {
    return request({
        url: '/sysJob/updateCronExpression',
        method: 'put',
        data: data
    });
};

export const sysJobResume = data => {
    return request({
        url: '/sysJob/resume/' + data,
        method: 'put'
    });
};

export const sysJobPause = data => {
    return request({
        url: '/sysJob/pause/' + data,
        method: 'put'
    });
};

export const sysJobRun = data => {
    return request({
        url: '/sysJob/run/' + data,
        method: 'put'
    });
};